import 'package:flutter/material.dart';

import '../tabs.dart';

class RegisterThirdPage extends StatefulWidget {
  RegisterThirdPage({Key key}) : super(key: key);

  @override
  _RegisterThirdPageState createState() => _RegisterThirdPageState();
}

class _RegisterThirdPageState extends State<RegisterThirdPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('第三步-完成注册') 
      ), 
      body: Center(
        child: Column(
          children: <Widget>[
            SizedBox(height:40),
            Text('输入密码完成注册'),
            SizedBox(height:20),
            RaisedButton(
              child: Text('确定'),
              onPressed: (){
                // 返回根
                Navigator.of(context).pushAndRemoveUntil(
                  MaterialPageRoute(builder: (context) => Tabs(index: 2)),
                  (route) => route == null
                );

                // Navigator.of(context).pop();
              }
            )
          ], 
        ), 
      ),
    );
  }
}